import React from 'react'

const Collist = ({colPlants,cancelCollection}) => {
  return (
    <ul className='collist'>
        {
            colPlants.map(item=>
                <div key={item.plantID}>
                    <li>{item.name}</li>
                    <button onClick={()=>{cancelCollection(item.plantID)}}>取消收藏</button>
                </div>
            )
        }
    </ul>
  )
}

export default Collist